The present invention relates to an apparatus for use in computer graphics to fill a given figure by defining "contour color data" for each of a plurality of dots representing the contour of the figure and "inner color data" for each of another plurality of dots representing the inside of the figure, respectively. In this specification, the "computer graphics" includes not only producing an image on a CRT or liquid crystal display but also making a hardcopy using a printer, for example. The "figures" are not limited to two-or three-dimensional figures, but include many other graphics primitives such as characters and signs. The "colors" include not just chromatic colors, but achromatic colors.
An exemplary figure filling apparatus utilizing a so-called "edge fill algorithm" is disclosed in Japanese Laid-open Publication No. 6-162212. This apparatus draws a baseline near a polygon to be filled. A plurality of sides of the polygon are selected one by one, and a trapezoidal area is defined between this baseline and each side selected. Then, a plurality of dots, existing inside the trapezoidal area, are processed one after another. By repeatedly performing this processing, the polygon in question can be ultimately filled. In accordance with this technique, however, each dot should be processed numerous times. Thus, it is known that the larger the number of vertices of a polygon, the lower the resulting processing speed.
Examples of figure filling apparatuses adopting a so-called "scan algorithm" are disclosed in U.S. Pat. Nos. 4,967,376 and 5,561,534. In these apparatuses, a plurality of scan lines, crossing a figure to be filled, are drawn in parallel to a certain axis of coordinates. These scan lines are selected one by one, and a plurality of dots, existing on each scan line selected, are processed one after another. By repeatedly performing this processing, the polygon in question can be filled as a result.
In the apparatus disclosed in U.S. Pat. No. 4,967,376, however, when a doughnut-like figure with double contour loops is filled, for example, one of these two contour loops should be tracked clockwise, and the other counterclockwise (see FIGS. 2a and 2b of the patent).
Also, in the apparatus disclosed in U.S. Pat. No. 5,561,534, if the contour color data of a figure should be different from the inner color data thereof, the inner color data must be defined first for all the dots representing the inside of the figure. And then the contour color data must be defined for the respective dots representing the contour of the figure (see FIGS. 85 and 86 of the patent).